The Tab View Component > FTabView.setSize()

 

FTabView.setSize()

Availability

Flash Player 6.

Usage

myTab_tbv.setSize (width)

Parameters

width A number specifying the new width of the component in pixels.

Returns


Nothing

Description

Sets the width of the component in pixels. This also defines the size of each tab. The size of the tabs will be the width divided by the number of tabs.

 

Notes

You cannot dynamically adjust the height of the component via the component's API.

 

Example

The tab_example1.fla example file contains an example of using this method.

The following code adds for tabs to the component, and then sets the size of the entire component to 300 pixels.

var tabs = ["Tab 1","Tab 2","Tab 3","Tab 4"];
myTab_tbv.setDataProvider(tabs);

myTab_tbv.setSize( 300 );
trace( "Width: " + myTab_tbv._width ); //traces "Width: 300"